use serde::{Deserialize, Serialize};
use struct_field_names_as_array::FieldNamesAsSlice;

// 收藏分类列表行数据
#[derive(sqlx::FromRow, Deserialize, Serialize, FieldNamesAsSlice)]
pub struct CollectTypeRow { 
    pub id: i64,
    pub name: String, 
    pub image: String,
    pub num: i64
}

// 收藏列表行数据
#[derive(sqlx::FromRow, Deserialize, Serialize, FieldNamesAsSlice)]
pub struct CollectRow { 
    pub id: i64,
    pub name: String, 
    pub url: String,
    pub is_show: i32
}

// 收藏列表行数据
#[derive(Deserialize, Serialize)]
pub struct CollectListResp { 
    pub id: i64,
    pub name: String, 
    pub collects: Vec<CollectRow>
}

#[derive(Deserialize, Serialize)]
pub struct SwReq {
    pub sw: Option<i32>
}
